package com.zhang.zhangapp.view.mine;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;

import com.zhang.zhangapp.R;
import com.zhang.zhangapp.application.MApplication;
import com.zhang.zhangapp.base.config.BaseConfig;
import com.zhang.zhangapp.view.BaseAppCompatActivityActivity;
import com.zhang.zhangapp.view.shop.ShopFragment;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/4/12.
 */
@ContentView(R.layout.activity_collect)
public class MineCollectActivity extends BaseAppCompatActivityActivity{
    Map<String,String> params = new HashMap<>();
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        x.view().inject(this);
        ShopFragment fragment = new ShopFragment();
        Bundle bundle = new Bundle();
        bundle.putString("methodName","hzg/member/collecList");
        params.put("memberId", MApplication.getInstance().getUser().getMemberId());
        params.put("pageSize", BaseConfig.PAGE_SIZE+"");
        bundle.putSerializable("params",(Serializable)params);
        fragment.setArguments(bundle);
        getSupportFragmentManager().beginTransaction().add(R.id.content_fragment,fragment).commit();
    }

    @Event(type = View.OnClickListener.class,value = R.id.action_bar_left_image)
    private void back(View view){
        this.finish();
    }
}
